package vip.zcn.mrn.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.zcn.mrn.annotation.ApiCheck;


/**
 * 测试接口
 */

@RestController
@RequestMapping("/test")
public class TestController {

    @ApiCheck("normal")
    @GetMapping("/ok")
    public String ok() {
        return "接口访问正常";
    }

    @ApiCheck("forbidden")
    @GetMapping("/fail")
    public String fail() {
        return "不会返回，因为AOP会拦截";
    }
}